<template>
  <view>
    <view class="search_box" :style="{backgroundColor:bgColor}" @click="goSearch">
      <view class="input_box" :style="{borderRadius:borderRadius+'px'}">
        <uni-icons type="search" size="17"></uni-icons>
        <text>搜索</text>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    props: {
      bgColor: {
        type: String,
        default:"C00000"
      },
      borderRadius:{
        type:Number,
        default:18
      }
    },
    data() {
      return {

      };
    },
    methods:{
      goSearch(){
        this.$emit('goSearch')
      }
    }
  }
</script>

<style lang="scss">
  .search_box {
    height: 50px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    background-color: #C00000;
    .input_box {
      height: 36px;
      background-color: #FFFFFF;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;

      text {
        margin-left: 5px;
      }
    }
  }
</style>
